﻿// ==UserScript==
// @name           itemfuck
// @namespace      http://code.google.com/p/helpful-js/
// @description    抽奖用测试v0.1
// @include        http://bbs.9gal.com/kf_fw_ig_one.php
// ==/UserScript==

	var btnSubmits = document.getElementsByName('submit')[3];
	var tables = document.getElementsByClassName('kf_fw_ig1');
	var str = tables[0].children[0].children[1].children[1].innerHTML;
	var require = str.search(/距离下次抽奖还需：0分钟/);
	if (require > 0){
	btnSubmits.click();
	}
	else{
	alert("抽奖时间未到");
	}

// 测试用 javascript:alert(document.getElementsByName('submit')[3].value);